<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>11、 v-bind处理样式 Class 与 Style 绑定</title>
    <style>


    </style>
</head>
<body>

    <div id="app">
        <h1>当前索引是：{{currentIndex}}</h1>
        <div style="color:#fff;font-size:18px;background:red;">1111</div>
        <div style="margin:10px;" :style="[styleobj]">1111</div>
        <div :style="{color:activeColor,fontSize:fontSize,background:bgcolor}">1111</div>
    </div>

    <script src="js/vue.global.js"></script>
    <script>
        var vue = Vue.createApp({
            data(){
                return {
                    activeColor: '#fff',
                    bgcolor:"red",
                    fontSize:'18px',
                    styleobj:{
                        color:"#fff",
                        fontSize:"18px",
                        background:"red"
                    }
                }
            },
            methods:{

            }
        }).mount("#app");

    </script>


</body>
</html>